<template>
	<view class="my">
		
		<view class="uni-list">
			<view class="uni-list-cell" v-for="(item,index) in list" :key="index">
				<navigator url="bind">
				<view class="uni-list-cell-navigate uni-navigate-right">
					{{item.value}}
				</view>
				</navigator>
			</view>
		</view>
		
		<view class="logout" @tap="logout()">退出登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{
						value: '绑定用户'
					}
				]
			};
		},
		methods: {
			logout() {
				uni.removeStorageSync('token');
				uni.removeStorageSync('userinfo');
				uni.reLaunch({
					url: '/pages/my/login'
				})
			}
		}
	}
</script>

<style>
	.my{
		width: 100%;
		flex-direction: column;
		font-size: 28upx;
	}
	
	navigator{
		width: 100%;
	}
	
	.my .logout{
		height: 80upx;
		margin-top: 80upx;
		background: #E60012;
		color: #fff;
		width: 90%;
		align-items: center;
		justify-content: center;
		border-radius: 40upx;
		margin-left: 5%;
		position: fixed;
		bottom: 40upx;
	}
</style>
